﻿<%@ Page Language="C#" MasterPageFile="~/Include/Admin.master" AutoEventWireup="true"
    CodeFile="Manage.aspx.cs" Inherits="Admin_Order_Manage" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <link href="/Style/DatePage.css" rel="stylesheet" type="text/css" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <ajaxToolkit:ToolkitScriptManager runat="Server" EnableScriptGlobalization="true"
        EnableScriptLocalization="true" ID="ScriptManager1" />
    <ajaxToolkit:CalendarExtender ID="cettime" runat="server" TargetControlID="txtTimeFrom"
        Format="yyyy年MM月dd日" PopupPosition="Right" />
    <ajaxToolkit:CalendarExtender ID="CalendarExtender1" runat="server" TargetControlID="txtTimeTo"
        Format="yyyy年MM月dd日" PopupPosition="Right" />
    <div>
        <table class="editTable" align="center" width="100%" cellpadding="0" cellspacing="1">
            <tr style="background-image: url('/images/管理员页面/title_bg1.jpg'); background-repeat: repeat-x;">
                <td colspan="8" style="font-weight: bold; font-size: large; font-family: 仿宋;">
                    <strong class="style1">订单管理</strong>
                </td>
            </tr>
            <tr>
                <th>
                    快递方式：
                </th>
                <td>
                    <asp:DropDownList ID="drpFangShi" runat="server" Height="20px" Width="100px">
                    </asp:DropDownList>
                </td>
                <th>
                    订单状态：
                </th>
                <td>
                    <asp:DropDownList ID="drpStatus" runat="server" Height="20px" Width="100px">
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <th>
                    下单时间：
                </th>
                <td>
                    <asp:TextBox ID="txtTimeFrom" runat="server" Height="21px" Width="100px"></asp:TextBox>
                    --<asp:TextBox ID="txtTimeTo" runat="server" Height="21px" Width="100px"></asp:TextBox>
                </td>
                <th>
                    关键字
                </th>
                <td>
                    <asp:TextBox ID="txtKey" runat="server" Height="21px" Width="200px"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <th>
                    运费：
                </th>
                <td>
                    <asp:TextBox ID="txtYunFeiFrom" runat="server" Height="21px" Width="100px"></asp:TextBox>
                    --<asp:TextBox ID="txtYunFeiTo" runat="server" Height="21px" Width="100px"></asp:TextBox>
                </td>
                <th>
                    订单总积分
                </th>
                <td>
                    <asp:TextBox ID="txtJiFenFrom" runat="server" Height="21px" Width="100px"></asp:TextBox>
                    --<asp:TextBox ID="txtJiFenTo" runat="server" Height="21px" Width="100px"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <th>
                    订单总价
                </th>
                <td>
                    <asp:TextBox ID="txtJieGeFrom" runat="server" Height="21px" Width="100px"></asp:TextBox>
                    --<asp:TextBox ID="txtJiaGeTo" runat="server" Height="21px" Width="100px"></asp:TextBox>
                </td>
                <td colspan="2">
                    <asp:Button ID="btn_search_Click" runat="server" Text="开始搜索" OnClick="btn_search_Click_Click" />
                </td>
            </tr>
        </table>
        <table cellpadding="0" cellspacing="0" style="width: 100%" bgcolor="#CCCCFF">
            <tr>
                <td style="padding: 5px; padding-right: 5px;" colspan="3">
                    <table cellspacing="0" cellpadding="0" style="width: 100%; padding-bottom: 5px; border: 1px;
                        border-color: #66CCFF; background-color: #ffffff">
                        <tr>
                            <td align="center">
                                <asp:ListView ID="Lv_OrderList" runat="server" DataKeyNames="ID" OnItemDeleting="Lv_OrderList_ItemDeleting"
                                    OnPagePropertiesChanged="Lv_OrderList_PagePropertiesChanged">
                                    <LayoutTemplate>
                                        <table width="100%" class="editTable" cellspacing="1">
                                            <tr>
                                                <th>
                                                    商品订单号
                                                </th>
                                                <th>
                                                    订单总价
                                                </th>
                                                <th>
                                                    订单总积分
                                                </th>
                                                <th>
                                                    快递方式
                                                </th>
                                                <th>
                                                    收货地址
                                                </th>
                                                <th>
                                                    运费
                                                </th>
                                                <th>
                                                    下单时间
                                                </th>
                                                <th>
                                                    买家
                                                </th>
                                                <th>
                                                    买家备注
                                                </th>
                                                <th>
                                                    操作
                                                </th>
                                            </tr>
                                            <asp:PlaceHolder ID="itemPlaceholder" runat="server"></asp:PlaceHolder>
                                        </table>
                                    </LayoutTemplate>
                                    <ItemTemplate>
                                        <tr>
                                            <td>
                                                <%#Eval("OrderID ")%>
                                            </td>
                                            <td>
                                                <%#Eval("Total")%>
                                            </td>
                                            <td>
                                                <%#Eval("TotalJiFen ")%>
                                            </td>
                                            <td>
                                                <%#ReturnFangShi(Eval("DeliveryID"))%>
                                            </td>
                                            <td>
                                                <%#ReturnAddress(Eval("DeliveryAddressID"))%>
                                            </td>
                                            <td>
                                                <%#Eval("DeliveryCost")%>
                                            </td>
                                            <td>
                                                <%#Eval("AddTime")%>
                                            </td>
                                            <td>
                                                <%#ReturnUserName(Eval("AddUserID"))%>
                                            </td>
                                            <td>
                                                <%#Eval("Comment")%>
                                            </td>
                                            <td>
                                                <a href="OrderDetail.aspx?ID=<%#Eval("ID") %>">查看</a> &nbsp;&nbsp;
                                                <asp:LinkButton ID="lbtnDelete" runat="server" Text="删除" OnClientClick="return confirm('你确定要删除吗?');"
                                                    CommandName="Delete" CommandArgument='<%#Eval("ID")%>'></asp:LinkButton>
                                            </td>
                                        </tr>
                                    </ItemTemplate>
                                </asp:ListView>
                                <div style="padding: 4px; text-align: center;">
                                    <asp:DataPager ID="Pager" runat="server" PagedControlID="Lv_OrderList" OnPreRender="Pager_PreRender"
                                        PageSize="20">
                                        <Fields>
                                            <asp:NumericPagerField ButtonCount="10" CurrentPageLabelCssClass="CurrentPage" NumericButtonCssClass="Page" />
                                            <asp:NextPreviousPagerField ShowLastPageButton="true" ShowPreviousPageButton="true"
                                                ShowFirstPageButton="true" />
                                            <asp:TemplatePagerField>
                                                <PagerTemplate>
                                                    共<%=Pager.TotalRowCount%>条
                                                </PagerTemplate>
                                            </asp:TemplatePagerField>
                                        </Fields>
                                    </asp:DataPager>
                                </div>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
    </div>
</asp:Content>
